# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-setuptools_scm
_pkgname=setuptools_scm
pkgver=7.0.5
pkgrel=0
pkgdesc="The blessed package to manage your versions by scm tags"
url="https://github.com/pypa/setuptools_scm"
arch="noarch"
license="MIT"
depends="py3-setuptools py3-tomli py3-packaging py3-typing-extensions"
checkdepends="py3-pytest mercurial"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-setuptools_scm" # Backwards compatibility
provides="py-setuptools_scm=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	TZ=UTC PYTHONPATH=$PWD/src pytest -v -k 'not test_pip_download'
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
5b3420f0aaa0dd1655afb0fdcedc3738b75dbb9d8205e0ad67555c251d330a0d3620a7297cfdcfabbc7386a8acf43fe73fa7f3b17e2d156495fd8b2ab7d1c985  setuptools_scm-7.0.5.tar.gz
"
